/*
 * @(#) NewsServiceImpl.java 1.0  2011-8-17 
 *
 * (c) Copyright 2011 smshen S3H3L3
 *
 * FILENAME    : NewsServiceImpl.java
 * PACKAGE     : com.sm.service.impl
 * CREATE DATE : 2011-8-17
 * AUTHOR      : smshen
 */

package com.sm.service.impl;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sm.dao.NewsDao;
import com.sm.model.News;
import com.sm.service.NewsService;

/*******************************************************************************
 *  #(c) smshen S3H3L3 
 *
 *  功能说明: 新闻服务管理实现层
  
 *  2011-8-17 下午5:14:17 smshen 创建文件
 * 
 *  修改说明: 创建文件

 *  2011-8-17 下午5:14:17 smshen 修改文件
 * 
 ******************************************************************************/

@Service
public class NewsServiceImpl implements NewsService {

	/**
	 * newsDao 新闻DAO
	 */
	@Autowired
	private NewsDao newsDao;
	
	@Override
	public void addNews(News news) {
		newsDao.addNews(news);

	}

	@Override
	public void delNews(int id) {
		newsDao.delNews(id);

	}

	@Override
	public News getNews(int id) {
		return newsDao.getNews(id);
	}

	@Override
	public String getAllNews(HttpServletRequest request) {
		return newsDao.getAllNews(request);
	}

	@Override
	public void updateAndSaveNews(News news) {
		newsDao.updateAndSaveNews(news);
	}

	@Override
	public List<News> getAllNews() {
		return newsDao.getAllNews();
	}

}


